package com.gidgabs.modules.entity;

import com.gidgabs.dto.TbProductDto;

import java.io.Serializable;
import java.util.Date;



/**
 * 产品表
 *
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-02 11:03:07
 */
public class TbProductEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	//
	private Integer productId;
	//用户id
	private Integer userId;
	//产品编号
	private String productCode;
	//产品名称
	private String productName;
	//产品单位
	private String unit;
	//产品原价
	private Integer price;
	//产品当前价格
	private Integer productPrice;
	//产品运费
	private Integer sendPrice;
	//产品库存
	private Integer stock;
	//产品类型 1 普通产品 2 广告产品
	private Integer productType;
	//产品分类字典表id
	private Integer fromTypeId;
	//属性表code
	private String propertyCode;
	//判断是否已删除 0:未删除，1:已删除
	private Integer deleteType;
	//创建时间
	private Date createTime;
	//修改时间
	private Date updateTime;
	//产品图片
	private String pictureUrl;
	//视频id
	private String videoId;
	//文图描述地址
	private String graphicIntroductionUrl;
	//视频描述地址id （阿里云视频表 vid）
	private String videoIntroductionId;
	//图片描述
	private String imageText;
	//源产品id 转发实质是复制一条数据 该字段用于判别用户
	private Integer sourceUserId;
	//广告费用
	private Integer advertisePrice;
	//设置转发人数 在规定人数中可得广告费用和转发人数的平均值
	private Integer forwardNumber;
	//广告图片url
	private String advertisePictureUrl;
	//广告视频id
	private String advertiseVideoId;

	public Integer getSourceUserId() {
		return sourceUserId;
	}

	public void setSourceUserId(Integer sourceUserId) {
		this.sourceUserId = sourceUserId;
	}

	public Integer getAdvertisePrice() {
		return advertisePrice;
	}

	public void setAdvertisePrice(Integer advertisePrice) {
		this.advertisePrice = advertisePrice;
	}

	public Integer getForwardNumber() {
		return forwardNumber;
	}

	public void setForwardNumber(Integer forwardNumber) {
		this.forwardNumber = forwardNumber;
	}

	public String getAdvertisePictureUrl() {
		return advertisePictureUrl;
	}

	public void setAdvertisePictureUrl(String advertisePictureUrl) {
		this.advertisePictureUrl = advertisePictureUrl;
	}

	public String getAdvertiseVideoId() {
		return advertiseVideoId;
	}

	public void setAdvertiseVideoId(String advertiseVideoId) {
		this.advertiseVideoId = advertiseVideoId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getVideoId() {
		return videoId;
	}

	public void setVideoId(String videoId) {
		this.videoId = videoId;
	}
	/**
	 * 设置：
	 */
	public void setProductId(Integer productId) {
		this.productId = productId;
	}
	/**
	 * 获取：
	 */
	public Integer getProductId() {
		return productId;
	}

	/**
	 * 设置：产品名称
	 */
	public void setProductName(String productName) {
		this.productName = productName;
	}
	/**
	 * 获取：产品名称
	 */
	public String getProductName() {
		return productName;
	}
	/**
	 * 设置：产品单位
	 */
	public void setUnit(String unit) {
		this.unit = unit;
	}
	/**
	 * 获取：产品单位
	 */
	public String getUnit() {
		return unit;
	}
	/**
	 * 设置：产品原价
	 */
	public void setPrice(Integer price) {
		this.price = price;
	}
	/**
	 * 获取：产品原价
	 */
	public Integer getPrice() {
		return price;
	}
	/**
	 * 设置：产品当前价格
	 */
	public void setProductPrice(Integer productPrice) {
		this.productPrice = productPrice;
	}
	/**
	 * 获取：产品当前价格
	 */
	public Integer getProductPrice() {
		return productPrice;
	}
	/**
	 * 设置：产品运费
	 */
	public void setSendPrice(Integer sendPrice) {
		this.sendPrice = sendPrice;
	}
	/**
	 * 获取：产品运费
	 */
	public Integer getSendPrice() {
		return sendPrice;
	}
	/**
	 * 设置：产品库存
	 */
	public void setStock(Integer stock) {
		this.stock = stock;
	}
	/**
	 * 获取：产品库存
	 */
	public Integer getStock() {
		return stock;
	}
	/**
	 * 设置：产品类型 1 journal 日志 2 advertisement 广告产品
	 */
	public void setProductType(Integer productType) {
		this.productType = productType;
	}
	/**
	 * 获取：产品类型 1 journal 日志 2 advertisement 广告产品
	 */
	public Integer getProductType() {
		return productType;
	}
	/**
	 * 设置：产品分类字典表id
	 */
	public void setFromTypeId(Integer fromTypeId) {
		this.fromTypeId = fromTypeId;
	}
	/**
	 * 获取：产品分类字典表id
	 */
	public Integer getFromTypeId() {
		return fromTypeId;
	}
	/**
	 * 设置：属性表code
	 */
	public void setPropertyCode(String propertyCode) {
		this.propertyCode = propertyCode;
	}
	/**
	 * 获取：属性表code
	 */
	public String getPropertyCode() {
		return propertyCode;
	}
	/**
	 * 设置：判断是否已删除 0:未删除，1:已删除
	 */
	public void setDeleteType(Integer deleteType) {
		this.deleteType = deleteType;
	}
	/**
	 * 获取：判断是否已删除 0:未删除，1:已删除
	 */
	public Integer getDeleteType() {
		return deleteType;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：修改时间
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	/**
	 * 获取：修改时间
	 */
	public Date getUpdateTime() {
		return updateTime;
	}

	public String getPictureUrl() {
		return pictureUrl;
	}

	public void setPictureUrl(String pictureUrl) {
		this.pictureUrl = pictureUrl;
	}

	/**
	 * 设置：文图描述地址
	 */
	public void setGraphicIntroductionUrl(String graphicIntroductionUrl) {
		this.graphicIntroductionUrl = graphicIntroductionUrl;
	}
	/**
	 * 获取：文图描述地址
	 */
	public String getGraphicIntroductionUrl() {
		return graphicIntroductionUrl;
	}
	/**
	 * 设置：视频描述地址id （阿里云视频表 vid）
	 */
	public void setVideoIntroductionId(String videoIntroductionId) {
		this.videoIntroductionId = videoIntroductionId;
	}
	/**
	 * 获取：视频描述地址id （阿里云视频表 vid）
	 */
	public String getVideoIntroductionId() {
		return videoIntroductionId;
	}
	/**
	 * 设置：图片描述
	 */
	public void setImageText(String imageText) {
		this.imageText = imageText;
	}
	/**
	 * 获取：图片描述
	 */
	public String getImageText() {
		return imageText;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public TbProductDto toDto(){
		TbProductDto tbproductentity = new TbProductDto();
		tbproductentity.setGraphicIntroductionUrl(this.getGraphicIntroductionUrl());
		tbproductentity.setVideoIntroductionId(this.getVideoIntroductionId());
		tbproductentity.setUserId(this.getUserId());
		tbproductentity.setVideoId(this.getVideoId());
		tbproductentity.setProductId(this.getProductId());
		tbproductentity.setProductCode(this.getProductCode());
		tbproductentity.setProductName(this.getProductName());
		tbproductentity.setUnit(this.getUnit());
		tbproductentity.setPrice(this.getPrice());
		tbproductentity.setProductPrice(this.getProductPrice());
		tbproductentity.setSendPrice(this.getSendPrice());
		tbproductentity.setStock(this.getStock());
		tbproductentity.setProductType(this.getProductType());
		tbproductentity.setFromTypeId(this.getFromTypeId());
		tbproductentity.setPropertyCode(this.getPropertyCode());
		tbproductentity.setDeleteType(this.getDeleteType());
		tbproductentity.setCreateTime(this.getCreateTime());
		tbproductentity.setUpdateTime(this.getUpdateTime());
		tbproductentity.setPictureUrl(this.getPictureUrl());
		tbproductentity.setImageText(this.getImageText());
		tbproductentity.setSourceUserId(this.getSourceUserId());
		tbproductentity.setAdvertisePrice(this.getAdvertisePrice());
		tbproductentity.setForwardNumber(this.getForwardNumber());
		tbproductentity.setAdvertisePictureUrl(this.getAdvertisePictureUrl());
		tbproductentity.setAdvertiseVideoId(this.getAdvertiseVideoId());
		return tbproductentity;
	}

}
